<template>
	<view class="Row3">
		<EmptyWarn v-if="figureList.length === 0">
			列表空空如也
		</EmptyWarn>
		<view class="listbig" v-else>
				<FigureItem v-for="item in figureList" :item="item" :key="item.userId" 
				  :blindStatus="status"
				  @cancelRequest="cancelRequest(item)"
				  @deleteRequest="$emit('deleteRequest',item)"
				  @requestVolunteer="$emit('requestVolunteer',item)"  
				  @checkRequest="$emit('checkRequest',item)" 
				  @click="open(item)">
				  </FigureItem>
		</view>
		
		
		<!-- 点击志愿者后显示的详细弹窗 -->
		<FigureInfo ref="figure"></FigureInfo>
	</view>
</template>

<script>
	import * as VolunteerApi from "@/api/assist/volunteer.js"
	import EmptyWarn from "@/components/EmptyWarn/EmptyWarn.vue"
	import FigureInfo from "./FigureInfo.vue"
	import FigureItem from "./FigureItem.vue"
	
	export default{
		emits:['refreshData','requestVolunteer','checkRequest','deleteRequest'],
		props:['figureList','status'],
		components:{
			FigureItem,
			FigureInfo,
			EmptyWarn
		},
		data(){
			return {
			}
		},
		methods:{
			open(item){
				this.$refs.figure.open(item.userId)
			},
			cancelRequest(item){
				this.$emit('cancelRequest',item)
			},
		},
		
	}
</script>

<style lang="scss">
	.Row3{
		width:500rpx;
		height: 100%;
		overflow: scroll;
		.listbig{
			
			display: flex;
			flex-direction: column;
			.nofind{
				display: flex;
				flex-direction: column;
				justify-content: center; /* 水平居中 */  
				align-items: center; /* 垂直居中 */  
				
				image{
					width: 64px;
					height: 64px;
					// opacity: 1;
				}
				text{
					font-size: 30rpx;
					font-weight: 500;
					letter-spacing: 0px;
					line-height: 35rpx;
					margin-top: 20rpx;
				}
			}
		
		}
	}
		
</style>